package com.nbsaas.boot.manufacturing.rest.convert;

import com.nbsaas.boot.manufacturing.data.entity.Equipment;
import com.nbsaas.boot.manufacturing.api.domain.request.EquipmentRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 设备请求对象转换成实体对象
*/

public class EquipmentEntityConvert  implements Converter<Equipment, EquipmentRequest> {

    @Override
    public Equipment convert(EquipmentRequest source) {
        Equipment result = new Equipment();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

